import java.io.File;
import java.text.SimpleDateFormat;
import java.util.SimpleTimeZone;

public class IOTest {
    public static void main(String[] args) {
        File f1 = new File("D:\\code\\IOTest\\src\\ityedao.txt");
        File f2 = new File("src\\ityedao.txt");
        System.out.println(f1.length());
        System.out.println(f1.exists());
        System.out.println(f2.exists());
        System.out.println(f2.length());
        long time = f1.lastModified();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        System.out.println(sdf.format(time));
        System.out.println(f2.getPath());
        System.out.println(f2.getAbsolutePath());
    }
}
